package mxmf.enums;

public class StatusEnum {
    
    public enum CatalogStatusEnum {
         uncatelod("0","待编目"),
         cataloged("1", "已编目");
         private final String code;
         
         private final String name;
       
         private CatalogStatusEnum(String code, String name) {
           this.code = code;
           this.name = name;
         }
         public String getname() {
             return name;
           }
         
           public String getCode() {
             return this.code;
           }
          
         public static String getNameByCode(String code) {
             for(CatalogStatusEnum typeEnum:CatalogStatusEnum.values()) {
                 if(typeEnum.getCode().equals(code)) {
                     return typeEnum.getname();
                 }
             }
             return null;
         }
     } 
     
    public enum AuditStatusEnum {
         wait_submit("INIT","待送审"),
         wait_audit("WAIT_AUDIT","待审核"),
         audit_pass("PASS","审核通过"),
         audit_back("DENY","审核打回"),
         part_pass("PASS_PART","部分通过"),
         send_auditing("SEND_AUDITING","送审中");
         private final String code;
         
         private final String name;
       
         private AuditStatusEnum(String code, String name) {
           this.code = code;
           this.name = name;
         }
         public String getname() {
             return name;
           }
         
           public String getCode() {
             return this.code;
           }
          
         public static String getNameByCode(String code) {
             for(AuditStatusEnum typeEnum:AuditStatusEnum.values()) {
                 if(typeEnum.getCode().equals(code)) {
                     return typeEnum.getname();
                 }
             }
             return null;
         } 
     }
     
     
    public enum CdnStatusEnum {
         uninject("0","未注入"),
         injected("1","已注入"),
         updateing("2","更新中"),
         distributing("3","分发中"),
         nomedia("5","无媒体"),
         inject_fail("6","注入失败");
         private final String code;
         
         private final String name;
       
         private CdnStatusEnum(String code, String name) {
           this.code = code;
           this.name = name;
         }
         public String getname() {
             return name;
           }
         
           public String getCode() {
             return this.code;
           }
          
         public static String getNameByCode(String code) {
             for(CdnStatusEnum typeEnum:CdnStatusEnum.values()) {
                 if(typeEnum.getCode().equals(code)) {
                     return typeEnum.getname();
                 }
             }
             return null;
         } 
     }
    public enum EnableStatusEnum {
         unable("ENABLE","可用"),
         enable("DISABLE","不可用");
         private final String code;
         
         private final String name;
       
         private EnableStatusEnum(String code, String name) {
           this.code = code;
           this.name = name;
         }
         public String getname() {
             return name;
           }
         
           public String getCode() {
             return this.code;
           }
          
         public static String getNameByCode(String code) {
             for(EnableStatusEnum typeEnum:EnableStatusEnum.values()) {
                 if(typeEnum.getCode().equals(code)) {
                     return typeEnum.getname();
                 }
             }
             return null;
         } 
     }
}
